{include file="layout/layout" /}
<body style="background-color: #FFF; overflow: auto;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>商城设置</h3>
                <h5>网站全局内容基本选项设置</h5>
            </div>
            <ul class="tab-base nc-row">
                {foreach name="group_list" item="v" key="k"}
                    <li><a href="{:url('System/index',['inc_type'=> $k])}" {if condition="$k==$inc_type"}class="current"{/if}><span>{$v}</span></a></li>
                {/foreach}
            </ul>
        </div>
    </div>
    <!-- 操作说明 -->
    <div class="explanation" id="explanation">
        <div class="title" id="checkZoom"><i class="fa fa-lightbulb-o"></i>
            <h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
            <span id="explanationZoom" title="收起提示"></span> </div>
        <ul>
            <li>系统平台全局设置,包括基础设置、购物、短信、邮件、水印和分销等相关模块。</li>
        </ul>
    </div>
    <form method="post" id="handlepost" action="{:url('System/alisms')}" enctype="multipart/form-data" name="form1">
        <input type="hidden" name="inc_type" value="{$inc_type}">
        <div class="ncap-form-default">
            <dl class="row">
                <dt class="tit">
                    <label for="sms_appkey">短信平台[appkey]</label>
                </dt>
                <dd class="opt">
                    <input id="sms_appkey" name="sms_appkey" value="{$config.sms_appkey}" class="input-txt" type="text"/>
                    <p class="notic">短信平台配置appkey/keyid</p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="sms_secretKey">短信平台[secretKey]</label>
                </dt>
                <dd class="opt">
                    <input id="sms_secretKey" name="sms_secretKey" value="{$config.sms_secretKey}" class="input-txt" type="text"/>
                    <p class="notic">短信平台配置secretKey</p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="sms_product">签名名称</label>
                </dt>
                <dd class="opt">
                    <input id="sms_product" name="sms_product" value="{$config.sms_product}" class="input-txt" type="text"/>
                    <p class="notic">短信平台签名名称</p>
                </dd>
            </dl>

            <dl class="row">
                <dt class="tit">
                    <label for="sms_product">模板code</label>
                </dt>
                <dd class="opt">
                    <input id="sms_code" name="sms_code" value="{$config.sms_code}" class="input-txt" type="text"/>
                    <p class="notic">短信平台模板code</p>
                </dd>
            </dl>

            <dl class="row">
                <dt class="tit">
                    <label for="sms_product">测试</label>
                </dt>
                <dd class="opt">
                    <input id="ceshi" value="" placeholder="请输入手机号码" class="input-txt" type="text"/>
                    <button type="button" id="button-ceshi">测试</button>
                    <p class="notic">此为测试功能</p>
                </dd>
            </dl>

            <div class="bot"><a href="JavaScript:void(0);" class="ncap-btn-big ncap-btn-green" onclick="document.form1.submit()">确认提交</a></div>
        </div>
    </form>
</div>
<div id="goTop"> <a href="JavaScript:void(0);" id="btntop"><i class="fa fa-angle-up"></i></a><a href="JavaScript:void(0);" id="btnbottom"><i class="fa fa-angle-down"></i></a></div>
</body>
<script type="text/javascript">
    $('#button-ceshi').click(function(){
      var phone = $('#ceshi').val();
      if(!(/^1[3|4|5|7|8][0-9]\d{4,8}$/.test(phone))){
          layer.open({
              content: '手机号码格式不正确！',
              icon: 2,
          });
          return false;
      }
        $.ajax({
            type:'get',
            data:{'phone':phone},
            dataType:'json',
            url:"{:url('system/smsphone')}",
            success:function(){
                alert();
            }
        })
    })

</script>
</html>